#include <arpa/inet.h>
#include <stdio.h>
int main()
{
    char buf[200];
    int ret = inet_pton(AF_INET, "192.168.1.125", buf);
    printf("%d\n", ret);
    printf("%s\n", buf);

    char ip[100];
    char *str = inet_ntop(AF_INET, buf, ip, sizeof(ip));
    printf("%s---%s\n", ip, str);
}